package com.etoak.controller;


import com.etoak.common.vo.ResultVO;
import com.etoak.entity.User;
import com.etoak.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author et2406
 * @since 2024-11-14
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    UserService userService;

    @PostMapping("/reg")
    public ResultVO<Object> registy(@RequestBody User user) {
        userService.registry(user);
        return ResultVO.success();
    }
}

